package com.thinkingstar.iads.projectcenter.controller;

import com.thinkingstar.iads.common.filter.GlobalsFilter;
import com.thinkingstar.iads.common.filter.UserLoginFilter;
import com.thinkingstar.iads.projectcenter.entity.PcProjectInfo;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.util.NutMap;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.By;
import org.nutz.mvc.annotation.Filters;
import org.nutz.mvc.annotation.Ok;

import java.util.ArrayList;
import java.util.List;

@IocBean
@At("/projectCenter/coordinateDesign")
@Filters({ @By(type = GlobalsFilter.class) , @By(type = UserLoginFilter.class)})
public class ProjectCoordinateDesignController {
    /**
     * 点击提出资料 进入页面
     * */
    @At("/index/?")
    @Ok("beetl:/projectRoot/pcCenter/coordinate/coordinateDesign.html")
    public NutMap index(String project_id) {
        NutMap nutMap = new NutMap();
        nutMap.put("project_id", project_id);
//        List<NutMap> list = projectTczlService.getDcTczlFileList(nutMap);
//        //获取这个阶段所有提入资料 里的非结构化文件
//        List<NutMap> listNew = projectSjpsService.getMentionFjghByPhaseAndContentId(nutMap);
//        PcProjectInfo projectInfo = daoPcProjectData.fetch(project_id);
//        List<NutMap> trzl = new ArrayList<NutMap>();
//        if (projectInfo.getProject_design_content_name().equals("动车运用所")){
//            for (int i=0;i<listNew.size();i++){
//                String fileName = (String)listNew.get(i).get("mention_information_name");
//                if (fileName.equals("车站表")){
//                    listNew.get(i).put("mention_information_name","02车站表");
//                    trzl.add(listNew.get(i));
//                } else if (fileName.equals("上阶段审查意见")){
//                    listNew.get(i).put("mention_information_name","01上阶段审查意见");
//                    trzl.add(listNew.get(i));
//                }
//            }
//            nutMap.put("listNew",trzl);
//        } else {
//            nutMap.put("listNew",listNew);
//        }
//
          nutMap.put("list",null);
        return nutMap;
    }

}
